/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package fiad.model.notenverwaltung;

import java.io.Serializable;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 *
 *
*/
@Entity
@Table(name = "teilnote")
@NamedQueries({
		@javax.persistence.NamedQuery(name = "lesenTeilnote", query = "Select teilnote FROM Teilnote teilnote WHERE teilnote.id = :teilnote"),
                @javax.persistence.NamedQuery(name = "lesenALLETeilnote", query = "Select teilnote FROM Teilnote teilnote")})
public class Teilnote implements Serializable {
    @Id
    @GeneratedValue

    private long id;
    private double note;
    private int gewichtung;
    @ManyToOne(cascade=CascadeType.ALL)
    private Kurs kurs;


    public Kurs getKurs() {
        return kurs;
    }

    public void setKurs(Kurs kurs) {
        this.kurs = kurs;
    }

    public Long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public int getGewichtung() {
        return gewichtung;
    }

    public void setGewichtung(int gewichtung) {
        this.gewichtung = gewichtung;
    }

    public double getNote() {
        return note;
    }

    public void setNote(double note) {
        this.note = note;
    }
    
}
